package ar.org.guiso.cmp.parsers;

import java.io.IOException;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

import org.w3c.dom.Document;
import org.xml.sax.SAXException;

import ar.org.guiso.utils.GUtils;

public class GXmlParser {

	private Document doc;

	public GXmlParser(String filePath) throws ParserConfigurationException,
			SAXException, IOException {
		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
		DocumentBuilder builder = factory.newDocumentBuilder();
		this.doc = builder.parse(GUtils.getStream(filePath));
		doc.getDocumentElement().normalize();
	}

	public static void main(String[] args) throws ParserConfigurationException,
			SAXException, IOException {
		GXmlParser parser = new GXmlParser("menu.xml");
	}
}
